import * as mongoose from 'mongoose';
import db2 from '../lib/db/mongodb2';


//备份数据
let StoreInfoSchema2: mongoose.Schema = new mongoose.Schema({
        sourceId: String,
        storeCode:String,//门店编码
        storeName:String,//门店名称
        store_classification:String,//门店类型
        channel:String,//门店渠道
        contact_name:String,//联系人姓名
        phone:String,//电话
        consumerCode:String,//客户编码
        consumerName:String,//客户名称
        city:String,//门店所在城市名称
        cityType:String,//城市等级
        store_address:String,//门店地址
        iT_Mall_name:String,//IT Mall name
        iT_Mall_address:String,//IT Mall address
}, { collection: 'storeInfo' });
export interface StoreInfo2 extends mongoose.Document {
    sourceId: string;
    storeCode:string,//门店编码
    storeName:string,//门店名称
    channel:string,//渠道
    store_classification:string,//门店类型
    //total_visit_permonth:number,//每月拜访门店次数
    contact_name:string,//联系人姓名
    phone:string,//电话
    consumerCode:string,//客户编码
    consumerName:string,//客户名称
    city:string,//门店所在城市名称
    cityType:string;//城市等级
    store_address:string,//门店地址
    iT_Mall_name:string,//IT Mall name
    iT_Mall_address:string//IT Mall address 
}
let storeInfoModel2 = db2.model<StoreInfo2>('storeInfo', StoreInfoSchema2);
// let storeInfoModel2 = db2.model('storeInfo2', StoreInfoSchema2);
export default storeInfoModel2;
